<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="__ROOT__/Public/Js/jquery-1.5.0.min.js"></script>
<title>文档编辑</title>
	<style>
	  table{border-collapse:collapse;border:none;line-height:16px;border:1px solid #ccc}
	  body{font-size:12px;}
	  tbody a{color:#0066FF}
	  tbody a:hover{text-decoration:underline}
	  table td{border-color:#66CCFF}
	  a{padding:3px 0px;text-decoration:none}
	  select{width:130px;}
	  a.c0,span#c0{color:#666}
      a.c1,span#c1{color:red}
      a.c2,span#c2{color:blue}
	  optgroup{color:#666;}
	  optgroup option{color:#000};
	</style>
</head>
<body>
   <form action="__URL__/edit" method="post" onsubmit="return checkForm();">
   <input name="id" type="hidden" value="{$doc.id}" />
   <input name="bakURL" type="hidden" value="{$bakURL}" />
       <table width="500" align="center" border="0">
  <tr>
    <td height="28" colspan="4">&nbsp;</td>
    </tr>
  <tr>
    <td width="72" align="center">名称</td>
    <td colspan="3"><label for="textfield"></label>
      <input name="title" type="text" id="title" value="{$doc.title}" size="50" /></td>
    </tr>
  <tr>
    <td align="center">专业</td>
    <td colspan="2"><label for="select"></label>
      <select name="zy_id" id="zy">
        <option value="">-------</option>
        <volist name='zyList' id='item'>
           <optgroup label="{$item.title}">
              <volist name='item.kids' id='kid'>
                 <option value="{$kid.id}" <if condition="$kid.id eq $doc['zy_id']">selected="selected"</if>>{$kid.title}</option>
              </volist>
           </optgroup>
        </volist>
      </select></td>
    <td width="73">&nbsp;</td>
  </tr>
  <tr>
    <td align="center">行业</td>
    <td colspan="2"><select name="hy_id" id="hy">
       <option value="">-------</option>
        <volist name='hyList' id='item'>
           <optgroup label="{$item.title}">
              <volist name='item.kids' id='kid'>
                 <option value="{$kid.id}" <if condition="$kid.id eq $doc['hy_id']">selected="selected"</if>>{$kid.title}</option>
              </volist>
           </optgroup>
        </volist>
    </select></td>
    <td>&nbsp;</td>
  </tr>
  
  <!--<tr>
    <td align="center">应用</td>
    <td colspan="2"><select name="app_id" id="app">
       <option value="">选择应用</option>
        <volist name='appList' id='item'>
           <option value="{$item.id}" <if condition="$item.id eq $doc['app_id']">selected="selected"</if>>{$item.name}</option>
        </volist>
    </select></td>
    <td>&nbsp;</td>
  </tr>-->
  <tr>
    <td align="center">分类</td>
    <td colspan="2">
    <select name="type_id" id="type">
       <option value="">-------</option>
        <volist name='typeList' id='item'>
           <option value="{$item.id}" <if condition="$item.id eq $doc['type_id']">selected="selected"</if>>{$item.name}</option>
        </volist>
    </select>
    </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="126"><input type="submit" name="button" id="button" value="提交" /></td>
    <td width="211"><input type="button" name="button2" id="button2" value="提交" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
     </table>
</form>
   <script>
      function checkForm(){
		  if($('#title').val() == ''){
			 alert('标题不能为空');
			 return false;  
		  }
		  if($('#zy').val() == ''){
			  alert('请选择专业');
			 return false; 
		  }
		  if($('#hy').val() == ''){
			  alert('请选择行业');
			 return false; 
		  }
		  if($('#type').val() == ''){
			  alert('请选择分类');
			 return false; 
		  }
		  return true;
	  }
   </script>

</body>
</html>
